Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3 - consultants in project #831

Merged
merged 8 commits into from
Oct 30, 2024
Merged

v3 - consultants in project #831

merged 8 commits into from
Oct 30, 2024

Conversation

mathiazom
Copy link
Contributor

@mathiazom mathiazom commented Oct 28, 2024

See #815

Shows the employee cards for each employee in the project consultants list. Data fetched from Chewbacca.

The project consultants field should now contain the employee emails.

image

Desktop

image

Mobile

image

Copy link

vercel bot commented Oct 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
variant-no ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 30, 2024 10:17am
variant-se-2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 30, 2024 10:17am

@@ -36,9 +36,10 @@ export const customerCaseProjectInfo = defineField({
defineField({
// TODO: We should be able to select the consultants from a list
name: "consultants",
description: "The consultants for the project",
description:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to use @variant.no or could we only use "amn"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are not sure enough that they are unique across countries (e.g. [email protected] and [email protected] could be two different people). So going for the safer option now. The user experience may be a little worse, but that could be fixed with a dropdown/search solution (where the internal value does not matter to the user)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point!

{customerCase.projectInfo.consultants.join(", ")}
</Text>
</div>
{consultantsResult.ok && (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't it enough to write consultantsResult?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you thinking just consultantsResult && ...?

This is using the Result type, so consultantsResult will always be an object. So checking if consultantsResult is truthy would always return true. The proper check with Result is to check if .ok is true.

<p className={styles.consultantName}>
{consultant.name}
</p>
{consultant.officeName && (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's nice to have office location, but we should probably ask designers

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! I guess it was included as a temporary replacement for role (e.g. "Salg" in Figma), which is not information we have right now.

Copy link
Contributor

@anemne anemne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good!

@mathiazom mathiazom force-pushed the feat/v3-employee-page branch from 4c077e9 to d14083b Compare October 30, 2024 08:20
Base automatically changed from feat/v3-employee-page to v3 October 30, 2024 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants